package org.example.service.impl;

import org.example.service.O2oOrderStrategyService;

import java.util.HashMap;
import java.util.Map;

public class O2oOrderStrategyFactory {
    private static final Map<Byte, O2oOrderStrategyService> strategies = new HashMap<>();

    public static O2oOrderStrategyService getO2oOrderStrategy(Byte o2oSpType) {
        return strategies.get(o2oSpType);
    }

    public static void register(Byte o2oSpType, O2oOrderStrategyService o2oOrderStrategyService) {
        strategies.put(o2oSpType, o2oOrderStrategyService);
    }
}
